/PROG  PNS0068
/ATTR
OWNER		= MNEDITOR;
COMMENT		= "53424343-PHEV";
PROG_SIZE	= 3425;
CREATE		= DATE 18-07-11  TIME 11:55:30;
MODIFIED	= DATE 25-04-29  TIME 18:33:56;
FILE_NAME	= PNS0020;
VERSION		= 0;
LINE_COUNT	= 121;
MEMORY_SIZE	= 3877;
PROTECT		= READ_WRITE;
TCD:  STACK_SIZE	= 0,
      TASK_PRIORITY	= 50,
      TIME_SLICE	= 0,
      BUSY_LAMP_OFF	= 0,
      ABORT_REQUEST	= 0,
      PAUSE_REQUEST	= 0;
DEFAULT_GROUP	= 1,*,*,*,*;
CONTROL_CODE	= 00000000 00000000;
/APPL
/MN
   1:  !******************************** ;
   2:  !     COSMA METAL FORMING  ;
   3:  !******************************** ;
   4:  !  LINE: CHINA CHANGSHA ;
   5:  !  ROBOT: R23 ;
   6:  !  PROGRAM: PNS0068 ;
   7:  !  PART:53424343 ;
   8:  !******************************** ;
   9:   ;
  10:  !INITIALIZE ;
  11:  OVERRIDE=20% ;
  12:  MOVE TO HOME    ;
  13:  R[14]=75    ;
  14:  R[18]=1    ;
  15:  R[19]=.15    ;
  16:   ;
  17:  !------------------------------- ;
  18:  !BEGINNING OF PROGRAM ;
  19:  CALL PARTDROP    ;
  20:  COL GUARD ADJUST R[14] ;
  21:  UTOOL_NUM=1 ;
  22:  UFRAME_NUM=0 ;
  23:  PAYLOAD[3] ;
  24:  R[5]=10    ;
  25:  OVERRIDE=R[5] ;
  26:  !INITIATE TO PICK-POUNCE ;
  27:J P[1:MIDDLE] 50% CNT100 ACC100    ;
  28:J P[2:PICK POUNCE] 50% CNT100 ACC100    ;
  29:  PAUSE ;
  30:  R[1]=0    ;
  31:  TIMER[1]=RESET ;
  32:  TIMER[1]=START ;
  33:   ;
  34:  LBL[10:TOP OF LOOF] ;
  35:  OVERRIDE=R[5] ;
  36:   ;
  37:  TIMER[3]=STOP ;
  38:  TIMER[2]=STOP ;
  39:  R[1]=R[1]+1    ;
  40:  R[2]=TIMER[2]    ;
  41:  R[3]=60/R[2]    ;
  42:  R[8]=TIMER[3]    ;
  43:  TIMER[2]=RESET ;
  44:  TIMER[2]=START ;
  45:  TIMER[3]=RESET ;
  46:   ;
  47:  !PROCEED TO PICK ;
  48:  LBL[20] ;
  49:  IF DI[1]=ON AND DI[3]=ON AND DI[8]=ON,JMP LBL[25] ;
  50:  IF DI[29]=ON,JMP LBL[90] ;
  51:  JMP LBL[20] ;
  52:   ;
  53:  LBL[25] ;
  54:  TIMER[3]=START ;
  55:  R[5]=100    ;
  56:  OVERRIDE=R[5] ;
  57:J P[3:PICK APPROACH] 100% CNT40 ACC100    ;
  58:   ;
  59:J P[4:PICK] 100% CNT0 TB R[18]sec,CALL PARTPICK ACC100 BREAK    ;
  60:  PAYLOAD[4] ;
  61:  CALL CHK_PICK    ;
  62:  MONITOR Z_CHECH ;
  63:J P[5:PICK DEPART] 100% CNT25 ACC100 TA R[20]sec,DO[5]=PULSE,1.0sec    ;
  64:  DO[8]=PULSE,1.0sec ;
  65:  LBL[27] ;
  66:  CALL CHECKPICK    ;
  67:  IF DI[9]=OFF OR DI[11]=OFF,JMP LBL[27] ;
  68:   ;
  69:J P[6:PICK SNEAK] 100% CNT100 ACC105    ;
  70:J P[7:PICK CLEAR] 100% CNT100 ACC110    ;
  71:   ;
  72:  LBL[30:GOTO DROP POUNCE] ;
  73:J P[8:DROP POUNCE] 100% CNT100 ACC110 BREAK    ;
  74:   ;
  75:  TIMER[3]=STOP ;
  76:  LBL[40:AT DROP POUNCE] ;
  77:  IF DI[2]=ON AND DI[4]=ON AND DI[5]=ON,JMP LBL[80] ;
  78:  IF DI[7]=ON AND DI[2]=ON,JMP LBL[50] ;
  79:  IF DI[18]=ON,JMP LBL[60] ;
  80:  JMP LBL[40] ;
  81:   ;
  82:  LBL[50:MOVE DROP SNEAK] ;
  83:  TIMER[3]=START ;
  84:  OVERRIDE=R[5] ;
  85:J P[9:DROP SNEAK] 100% CNT100 ACC100 BREAK    ;
  86:  LBL[51:DROP OR C-P-S] ;
  87:  IF DI[2]=ON AND DI[4]=ON AND DI[5]=ON,JMP LBL[80] ;
  88:  IF DI[18]=ON,JMP LBL[40] ;
  89:  JMP LBL[51] ;
  90:  JMP LBL[50] ;
  91:   ;
  92:  LBL[60:MOVE CLS-PRS-ACC] ;
  93:J P[1:MIDDLE] 50% CNT100 ACC100    ;
  94:  PAUSE ;
  95:  JMP LBL[30] ;
  96:   ;
  97:  LBL[80:DROP ENABLED] ;
  98:  TIMER[3]=START ;
  99:  !PROCEED TO DROP ;
 100:  OVERRIDE=R[5] ;
 101:J P[10:DROP APPROACH] 100% CNT30 ACC100    ;
 102:  MONITOR END Z_CHECH ;
 103:J P[11:DROP] 100% CNT0 TB R[19]sec,CALL PARTDROP ACC100    ;
 104:  DO[6]=PULSE,1.0sec ;
 105:  PAYLOAD[3] ;
 106:  CALL CHK_DROP    ;
 107:   ;
 108:J P[12:DROP DEPART] 100% CNT60 ACC130 TA    .20sec,DO[7]=PULSE,0.5sec    ;
 109:J P[13:DROP CLEAR] 100% CNT100 ACC130    ;
 110:  !GOTO PICK POUNCE ;
 111:J P[2:PICK POUNCE] 100% CNT100 ACC100 BREAK    ;
 112:  IF DI[29]=ON,JMP LBL[90] ;
 113:  JMP LBL[10] ;
 114:   ;
 115:  LBL[90:END OF CYCLE] ;
 116:  TIMER[1]=STOP ;
 117:  R[4]=TIMER[1]    ;
 118:J P[1:MIDDLE] 50% CNT100    ;
 119:  MOVE TO HOME    ;
 120:   ;
 121:  LBL[100:END OF PROGRAM] ;
/POS
P[1:"MIDDLE"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 1',
	X =  2086.456  mm,	Y =     -.007  mm,	Z =  -780.000  mm,
	W =  -180.000 deg,	P =     -.000 deg,	R =  -180.000 deg,
	E1=   107.700 deg
};
P[2:"PICK POUNCE"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 0',
	X =  2193.270  mm,	Y =  1576.000  mm,	Z = -1030.000  mm,
	W =   179.720 deg,	P =     -.100 deg,	R =   142.699 deg,
	E1=   143.549 deg
};
P[3:"PICK APPROACH"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 0',
	X =  2652.449  mm,	Y =  3217.910  mm,	Z =  -967.285  mm,
	W =  -179.148 deg,	P =     -.112 deg,	R =    90.626 deg,
	E1=   193.520 deg
};
P[4:"PICK"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 0',
	X =  2652.449  mm,	Y =  3217.910  mm,	Z = -1198.805  mm,
	W =  -179.148 deg,	P =     -.112 deg,	R =    90.626 deg,
	E1=   193.520 deg
};
P[5:"PICK DEPART"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 0',
	X =  2652.393  mm,	Y =  3217.849  mm,	Z =  -933.558  mm,
	W =  -179.146 deg,	P =     -.108 deg,	R =    90.626 deg,
	E1=   193.519 deg
};
P[6:"PICK SNEAK"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 0',
	X =  2274.210  mm,	Y =  2079.135  mm,	Z =  -925.200  mm,
	W =   179.507 deg,	P =     -.340 deg,	R =   131.446 deg,
	E1=   154.369 deg
};
P[7:"PICK CLEAR"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 0',
	X =  2182.947  mm,	Y =  1585.145  mm,	Z =  -920.000  mm,
	W =   179.575 deg,	P =     -.130 deg,	R =   144.238 deg,
	E1=   142.080 deg
};
P[8:"DROP POUNCE"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 1',
	X =  2117.526  mm,	Y = -1000.000  mm,	Z =  -838.240  mm,
	W =  -179.595 deg,	P =      .202 deg,	R =  -159.711 deg,
	E1=    86.239 deg
};
P[9:"DROP SNEAK"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 1',
	X =  2266.514  mm,	Y = -2193.656  mm,	Z =  -864.700  mm,
	W =  -178.681 deg,	P =    -2.765 deg,	R =  -136.825 deg,
	E1=    62.950 deg
};
P[10:"DROP APPROACH"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 1',
	X =  2637.146  mm,	Y = -3357.749  mm,	Z =  -885.758  mm,
	W =   178.648 deg,	P =    -1.807 deg,	R =   -92.106 deg,
	E1=    16.691 deg
};
P[11:"DROP"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 1',
	X =  2637.145  mm,	Y = -3357.749  mm,	Z = -1117.599  mm,
	W =   178.648 deg,	P =    -1.807 deg,	R =   -92.106 deg,
	E1=    16.691 deg
};
P[12:"DROP DEPART"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 1',
	X =  2637.145  mm,	Y = -3357.749  mm,	Z =  -984.479  mm,
	W =   178.648 deg,	P =    -1.807 deg,	R =   -92.106 deg,
	E1=    16.691 deg
};
P[13:"DROP CLEAR"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 1',
	X =  2218.718  mm,	Y = -1684.434  mm,	Z = -1050.000  mm,
	W =  -179.322 deg,	P =     -.052 deg,	R =  -143.177 deg,
	E1=    69.533 deg
};
/END
